<template>
	<view>
		<view class="panel-info">
			<view class="panel-title u-flex">
				<view class="title">基本信息</view>
				<!-- <view class="more">查看更多<text class="iconfont icon-jiantouyou"></text></view> -->
			</view>
			<view class="panel-content u-flex u-flex-wrap">
				<view class="line-box u-flex line-box-nowrap" v-if="data.name">
					<view class="title">小区名：</view>
					<view class="value">{{data.name}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.housebaseset_features">
					<view class="title">特色：</view>
					<view class="value">{{data.housebaseset_features.map(i=>i.name).toString()}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.area">
					<view class="title">面积：</view>
					<view class="value">{{data.area}}m²</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.housebaseset_orientation_name">
					<view class="title">朝向：</view>
					<view class="value">{{data.housebaseset_orientation_name}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.floor">
					<view class="title">楼层：</view>
					<view class="value">{{data.floor}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.buildingtype">
					<view class="title">楼型：</view>
					<view class="value">{{data.buildingtype}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.housebaseset_decorationtype_id">
					<view class="title">装修：</view>
					<view class="value">{{data.housebaseset_decorationtype_id}}</view>
				</view>
				
				<view class="line-box u-flex line-box-nowrap" v-if="Number(data.unitprice)">
					<view class="title">均价：</view>
					<view class="value">{{Number(data.unitprice)}}元</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.unitprice_range">
					<view class="title">均价范围：</view>
					<view class="value">{{data.unitprice_range}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="Number(data.totalprice)">
					<view class="title">总价：</view>
					<view class="value">{{Number(data.totalprice)}}万</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.totalprice_range">
					<view class="title">总价范围：</view>
					<view class="value">{{data.totalprice_range}}</view>
				</view>
				
				
				<view class="line-box u-flex line-box-nowrap" v-if="data.developers">
					<view class="title">开发商：</view>
					<view class="value">{{data.developers}}</view>
				</view>
				
				<view class="line-box u-flex line-box-nowrap" v-if="data.housebaseset_propertytype_name">
					<view class="title">物业类型：</view>
					<view class="value">{{data.housebaseset_propertytype_name}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.propertyrightsyears">
					<view class="title">产权年限：</view>
					<view class="value">{{data.propertyrightsyears}}年</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.region_name">
					<view class="title">板块区域：</view>
					<view class="value">{{data.region_name}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.address">
					<view class="title">详细地址：</view>
					<view class="value">{{data.address}}</view>
				</view>
				
				<view class="line-box u-flex line-box-nowrap" v-if="data.openingtime">
					<view class="title">开盘时间：</view>
					<view class="value">{{$u.date(data.openingtime,'yyyy-mm-dd')}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.deliverytime">
					<view class="title">交房时间：</view>
					<view class="value">{{$u.date(data.deliverytime,'yyyy-mm-dd')}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.saleaddress">
					<view class="title">售楼地址：</view>
					<view class="value">{{data.saleaddress}}</view>
				</view>
				
			</view>
		</view>
		
		<!-- <view class="panel-info">
			<view class="panel-title u-flex">
				<view class="title">生活配套</view>
			</view>
			<view class="panel-content u-flex u-flex-wrap">
				<view class="line-box u-flex line-box-nowrap" v-if="data.traffic">
					<view class="title">交通：</view>
					<view class="value">{{data.traffic}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.education">
					<view class="title">教育：</view>
					<view class="value">{{data.education}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.hospital">
					<view class="title">医疗：</view>
					<view class="value">{{data.hospital}}</view>
				</view>
				<view class="line-box u-flex line-box-nowrap" v-if="data.life">
					<view class="title">生活：</view>
					<view class="value">{{data.life}}</view>
				</view>
			</view>
		</view> -->
		<view   class="panel-info">
			<view class="panel-title u-flex">
				<view class="title">详细信息</view>
			</view>
			
		</view>
		<view style="padding: 20rpx;">
			<u-parse :html="data.detail"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		computed:{
			data(){
				return this.$store.state.vuex_houseMore
			}
		},
		onReady() {
			setTimeout(t=> !this.data && this.$app.back(),200)
		}
	}
</script>

<style lang="scss">
	// 房源基本信息
	.panel-info{background-color: #fff;border-top: 12rpx solid #f4f4f4;
		&:first-child{border-top: 0;}
		
		.panel-title{
			padding: 20rpx 40rpx;justify-content: space-between;
			.title{font-size: 32rpx;font-weight: bold;color: #111;}
			.more{color: #5d5d5d;}
		}
		.panel-content{padding: 0 40rpx 20rpx;}
		.line-box{
			align-items: flex-start;width: 50%;padding: 8rpx 0;
			&.line-box-nowrap{width: 100%;}
			.title{color: #979797;white-space: nowrap;}
			.value{color: #000000;word-break: break-all;text-align: justify;}
		}
	}
</style>
